/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package classesEntidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ra106797
 */
@Embeddable
public class DisciplinacurriculoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IDCURRICULO")
    private int idcurriculo;
    @Basic(optional = false)
    @Column(name = "IDDISCIPLINA")
    private int iddisciplina;
    @Basic(optional = false)
    @Column(name = "TIPORELACAO")
    private String tiporelacao;

    public DisciplinacurriculoPK() {
    }

    public DisciplinacurriculoPK(int idcurriculo, int iddisciplina, String tiporelacao) {
        this.idcurriculo = idcurriculo;
        this.iddisciplina = iddisciplina;
        this.tiporelacao = tiporelacao;
    }

    public int getIdcurriculo() {
        return idcurriculo;
    }

    public void setIdcurriculo(int idcurriculo) {
        this.idcurriculo = idcurriculo;
    }

    public int getIddisciplina() {
        return iddisciplina;
    }

    public void setIddisciplina(int iddisciplina) {
        this.iddisciplina = iddisciplina;
    }

    public String getTiporelacao() {
        return tiporelacao;
    }

    public void setTiporelacao(String tiporelacao) {
        this.tiporelacao = tiporelacao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idcurriculo;
        hash += (int) iddisciplina;
        hash += (tiporelacao != null ? tiporelacao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DisciplinacurriculoPK)) {
            return false;
        }
        DisciplinacurriculoPK other = (DisciplinacurriculoPK) object;
        if (this.idcurriculo != other.idcurriculo) {
            return false;
        }
        if (this.iddisciplina != other.iddisciplina) {
            return false;
        }
        if ((this.tiporelacao == null && other.tiporelacao != null) || (this.tiporelacao != null && !this.tiporelacao.equals(other.tiporelacao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "classesEntidades.DisciplinacurriculoPK[ idcurriculo=" + idcurriculo + ", iddisciplina=" + iddisciplina + ", tiporelacao=" + tiporelacao + " ]";
    }
    
}
